<?php
// 本类由系统自动生成，仅供测试用途
class GuildAction extends CommonAction{
	 
	public function index() { 
		$this->chk();
		$this->display("guild:guild");
	}

	public function chk(){
		if(Cookie::get('acc_name')==""){
			$this->assign('jumpUrl',"__APP__/Public/login"); 
			$this->error("请登录!");
			return false;
		}
		else{
			$name = Cookie::get('acc_name');
			$name_array = d('guild_member')->where("acc_name ='".$name."'")->find();
			
			if($name_array['glevel'] != "会长"){
				
				$this->assign('jumpUrl',"__APP__"); 
				$this->error("您没有权限!");
				return false;
			}
		}
	}
	

	
}
?>